home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-06-26 | 1.6 KB | 55 lines | [TEXT/GEOL] |
- Item 0304395 21-May-89 20:25
-
- From: D0416 Futuresoft System Design, PRT
-
- To: D2086 Efficient Field Svc, C Faith, PRT
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Files By Date Script
-
- Curtis,
-
- You asked me on Compuserve if I had a script to sort files by date. I found a
- Link on my hard drive that does just that if you haven’t already. You could
- then use that as input into something else.
-
- Hope this helps, -Ken Addison
-
- The link follows:
-
- ****** L I N K B E G I N N I N G *****
- From: REKIETA1 Rekieta, Paul
-
- To: D0756 Tradenet, Dev, Adam Wildavsky
-
- cc: D1220 VarLite, Dev, Andy Meldrum
- MACAPP.TECH$ MACAPP Tech
-
- Sub: files by date
-
-
- A little bit simpler would be the following command line:
-
- files -t TEXT -n -x m | sort -quote -d -f '4,2,3,7,5,6,1' -fs ' /:' ≥ dev:null
-
- Your three step sort could be done in one pass.
-
- The -f option takes field numbers as multiple keys as follows:
- 4 = yy, 2 = mm, 3 = dd, 7 = AM/PM, 5 = HH, 6 = MM, 1 = file name
-
- The -fs options specified field seperators as: (space) or / or :
-
- The -quote option is necessary to treat quoted fields (like the file name) as
- one field.
-
- The ≥ redirection gets rid of a warning message produced by the sort tool. When
- reading piped input, it can't get tab settings and so it issues a message.
-
- Paul Rekieta
- Apple Computer
- Communications Product Development
- ************ E N D O F L I N K **************
-
-
-